@echo off
for %%i in (*.mp4) do ( if not exist "%%~ni" (
        mkdir "%%~ni"
    )
    ffmpeg -i "%%~ni.mp4" -c:v copy -c:a aac -f hls -hls_time 10 -hls_list_size 0 -hls_segment_filename "%%~ni/%%~ni-%%05d.ts" -hls_base_url "%%~ni/" /%%~ni/%%~ni.m3u8
)